import { ICaptcha, IUpdateInfo, IUpdatePassword, IUserInfoVo, IUserLogin } from './login.typings'
import { http } from '@/utils/http'

/**
 * 登录表单
 */
export interface ILoginForm {
  username: string
  password: string
  captchaVerification?: string
  code: string // 用户输入的验证码内容
  uuid: string // 后端返回的验证码唯一标识
}

export interface IRegisterForm {
  phoneNumber: string
  code: string
  password: string
  confirmPassword: string
  userName: string
}

/**
 * 获取验证码
 * @returns 获取类型对于应的字典数据
 */
export const getDictByType = (params) => {
  return http.get<ICaptcha>('/wp/dict/getType', params)
}
